<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: Bootloader Core</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__bl__core.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">Bootloader Core<div class="ingroups"><a class="el" href="group__bootloader.html">Bootloader</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Core bootloader functionality.  
<a href="#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for Bootloader Core:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<center><table><tr><td><div class="center"><iframe scrolling="no" frameborder="0" src="group__bl__core.svg" width="543" height="83"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:unionstandard__version__t"><td class="memItemLeft" align="right" valign="top">union &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#unionstandard__version__t">standard_version_t</a></td></tr>
<tr class="memdesc:unionstandard__version__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure of version property.  <a href="group__bl__core.html#unionstandard__version__t">More...</a><br /></td></tr>
<tr class="separator:unionstandard__version__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structstandard__version__t_8____unnamed____"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#structstandard__version__t_8____unnamed____">standard_version_t.__unnamed__</a></td></tr>
<tr class="separator:structstandard__version__t_8____unnamed____"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structstandard__version__t_8_b"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#structstandard__version__t_8_b">standard_version_t.B</a></td></tr>
<tr class="separator:structstandard__version__t_8_b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gacb231e53631fadb057c5f9a6890858a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacb231e53631fadb057c5f9a6890858a8"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#gacb231e53631fadb057c5f9a6890858a8">shutdown_type_t</a> { <br />
&#160;&#160;<b>kShutdownType_Shutdown</b> = 0, 
<br />
&#160;&#160;<b>kShutdownType_Cleanup</b> = 1, 
<br />
&#160;&#160;<b>kShutdownType_Reset</b> = 2
<br />
 }<tr class="memdesc:gacb231e53631fadb057c5f9a6890858a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shutdown types. <br /></td></tr>
</td></tr>
<tr class="separator:gacb231e53631fadb057c5f9a6890858a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4426f7a8d4be291a2edc8adad91aa5d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4426f7a8d4be291a2edc8adad91aa5d4"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga4426f7a8d4be291a2edc8adad91aa5d4">_bootloader_status</a> { <br />
&#160;&#160;<b>kStatus_UnknownCommand</b> = MAKE_STATUS(kStatusGroup_Bootloader, 0), 
<br />
&#160;&#160;<b>kStatus_SecurityViolation</b> = MAKE_STATUS(kStatusGroup_Bootloader, 1), 
<br />
&#160;&#160;<b>kStatus_AbortDataPhase</b> = MAKE_STATUS(kStatusGroup_Bootloader, 2), 
<br />
&#160;&#160;<b>kStatus_Ping</b> = MAKE_STATUS(kStatusGroup_Bootloader, 3), 
<br />
&#160;&#160;<b>kStatus_NoResponse</b> = MAKE_STATUS(kStatusGroup_Bootloader, 4), 
<br />
&#160;&#160;<b>kStatus_NoResponseExpected</b> = MAKE_STATUS(kStatusGroup_Bootloader, 5)
<br />
 }<tr class="memdesc:ga4426f7a8d4be291a2edc8adad91aa5d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bootloader status codes. <br /></td></tr>
</td></tr>
<tr class="separator:ga4426f7a8d4be291a2edc8adad91aa5d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7a87f0e341a04a6fee751176175fefd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#gae7a87f0e341a04a6fee751176175fefd">_bl_status_groups</a> { <br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefda7b33b82772d8f6ee53f685f2fe0e0804">kStatusGroup_Bootloader</a> = kStatusGroup_ApplicationRangeStart, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefda52c1421d8ea0a8ac30cf7987f3525f05">kStatusGroup_SBLoader</a>, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefda0295e6a28f7dbf89c64224602568aa4d">kStatusGroup_MemoryInterface</a>, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefdaae9ad1ebc64343438b5f3db0e44d6e0b">kStatusGroup_PropertyStore</a>, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefdaa9b2d10290a393e79fe97ad50241e4c9">kStatusGroup_AppCrcCheck</a>, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefda160b360d06d9c43b36a1d5eb74481f2e">kStatusGroup_Packetizer</a>, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae7a87f0e341a04a6fee751176175fefdab4480cf74173c3593e256bc4b0d2df12">kStatusGroup_ReliableUpdate</a>
<br />
 }<tr class="memdesc:gae7a87f0e341a04a6fee751176175fefd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bootloader status group numbers.  <a href="group__bl__core.html#gae7a87f0e341a04a6fee751176175fefd">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gae7a87f0e341a04a6fee751176175fefd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae9db7782b7f2dccb1dc6423be46ffc96"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#gae9db7782b7f2dccb1dc6423be46ffc96">_bl_driver_status_groups</a> { <br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae9db7782b7f2dccb1dc6423be46ffc96ac4d0ba42131a1f2221998e4ee22ca61f">kStatusGroup_QuadSPIDriver</a> = 4, 
<br />
&#160;&#160;<a class="el" href="group__bl__core.html#ggae9db7782b7f2dccb1dc6423be46ffc96a64605e39ebfb169850811207616c7823">kStatusGroup_OTFADDriver</a> = 5
<br />
 }<tr class="memdesc:gae9db7782b7f2dccb1dc6423be46ffc96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Driver status group numbers.  <a href="group__bl__core.html#gae9db7782b7f2dccb1dc6423be46ffc96">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gae9db7782b7f2dccb1dc6423be46ffc96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga169fadd1031eb3735ac99235f0db28a6"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga169fadd1031eb3735ac99235f0db28a6">_external_mem_identifiers</a> { <b>kExternalMemId_QuadSPI0</b> = 1
 }<tr class="memdesc:ga169fadd1031eb3735ac99235f0db28a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">External memory identifiers.  <a href="group__bl__core.html#ga169fadd1031eb3735ac99235f0db28a6">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga169fadd1031eb3735ac99235f0db28a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga89505060c03c972c77c797b5285f0e95"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga89505060c03c972c77c797b5285f0e95">shutdown_cleanup</a> (<a class="el" href="group__bl__core.html#gacb231e53631fadb057c5f9a6890858a8">shutdown_type_t</a> shutdown)</td></tr>
<tr class="memdesc:ga89505060c03c972c77c797b5285f0e95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepare system for exiting the bootloader.  <a href="#ga89505060c03c972c77c797b5285f0e95">More...</a><br /></td></tr>
<tr class="separator:ga89505060c03c972c77c797b5285f0e95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga271d81e120239010aa16433534a27e21"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga271d81e120239010aa16433534a27e21">is_valid_application_location</a> (uint32_t applicationAddress)</td></tr>
<tr class="memdesc:ga271d81e120239010aa16433534a27e21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify that a given address is ok to jump to.  <a href="#ga271d81e120239010aa16433534a27e21">More...</a><br /></td></tr>
<tr class="separator:ga271d81e120239010aa16433534a27e21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5009c5ab066dfd46ebd147b170d150ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5009c5ab066dfd46ebd147b170d150ad"></a>
static const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga5009c5ab066dfd46ebd147b170d150ad">get_peripheral_name</a> (uint32_t peripheralTypeMask)</td></tr>
<tr class="memdesc:ga5009c5ab066dfd46ebd147b170d150ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of a peripheral given its type mask. <br /></td></tr>
<tr class="separator:ga5009c5ab066dfd46ebd147b170d150ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabfe82b5ceefabda25977d3e08eb1226f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#gabfe82b5ceefabda25977d3e08eb1226f">get_user_application_entry</a> (uint32_t *appEntry, uint32_t *appStack)</td></tr>
<tr class="memdesc:gabfe82b5ceefabda25977d3e08eb1226f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the user application address and stack pointer.  <a href="#gabfe82b5ceefabda25977d3e08eb1226f">More...</a><br /></td></tr>
<tr class="separator:gabfe82b5ceefabda25977d3e08eb1226f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8cd77901865430860e0fa71ad749b4cf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8cd77901865430860e0fa71ad749b4cf"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga8cd77901865430860e0fa71ad749b4cf">jump_to_application</a> (uint32_t applicationAddress, uint32_t stackPointer)</td></tr>
<tr class="memdesc:ga8cd77901865430860e0fa71ad749b4cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exits bootloader and jumps to the user application. <br /></td></tr>
<tr class="separator:ga8cd77901865430860e0fa71ad749b4cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae8b58a630aef3ee49e40247e95d2afe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaae8b58a630aef3ee49e40247e95d2afe"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>is_direct_boot</b> (void)</td></tr>
<tr class="separator:gaae8b58a630aef3ee49e40247e95d2afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f896e38b0d2d72ede8be961e41735ac"><td class="memItemLeft" align="right" valign="top">static peripheral_descriptor_t const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga2f896e38b0d2d72ede8be961e41735ac">get_active_peripheral</a> (void)</td></tr>
<tr class="memdesc:ga2f896e38b0d2d72ede8be961e41735ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the active peripheral.  <a href="#ga2f896e38b0d2d72ede8be961e41735ac">More...</a><br /></td></tr>
<tr class="separator:ga2f896e38b0d2d72ede8be961e41735ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fc04d10b4ac9c20e34f253a7e363674"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga6fc04d10b4ac9c20e34f253a7e363674">bootloader_init</a> (void)</td></tr>
<tr class="memdesc:ga6fc04d10b4ac9c20e34f253a7e363674"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the bootloader and peripherals.  <a href="#ga6fc04d10b4ac9c20e34f253a7e363674">More...</a><br /></td></tr>
<tr class="separator:ga6fc04d10b4ac9c20e34f253a7e363674"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gada615fb904de1f9e285728377d2054f5"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#gada615fb904de1f9e285728377d2054f5">bootloader_run</a> (void)</td></tr>
<tr class="memdesc:gada615fb904de1f9e285728377d2054f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bootloader outer loop.  <a href="#gada615fb904de1f9e285728377d2054f5">More...</a><br /></td></tr>
<tr class="separator:gada615fb904de1f9e285728377d2054f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade2202a404bcce238c024d3ed5e14249"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#gade2202a404bcce238c024d3ed5e14249">bootloader_flash_init</a> (void)</td></tr>
<tr class="separator:gade2202a404bcce238c024d3ed5e14249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a887a54f2eabb3a88625573e0686dff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1a887a54f2eabb3a88625573e0686dff"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>configure_quadspi_as_needed</b> (void)</td></tr>
<tr class="separator:ga1a887a54f2eabb3a88625573e0686dff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga840291bc02cba5474a4cb46a9b9566fe"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:ga840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Entry point for the bootloader. <br /></td></tr>
<tr class="separator:ga840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8fa791bd740fb6526cc6ccb0790d85b8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8fa791bd740fb6526cc6ccb0790d85b8"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga8fa791bd740fb6526cc6ccb0790d85b8">is_application_ready_for_executing</a> (uint32_t applicationAddress)</td></tr>
<tr class="memdesc:ga8fa791bd740fb6526cc6ccb0790d85b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Jump application is considered ready for executing if the location is valid and crc check is passed. <br /></td></tr>
<tr class="separator:ga8fa791bd740fb6526cc6ccb0790d85b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga123174ce3a62186d29577e087c34ce91"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#ga123174ce3a62186d29577e087c34ce91">exit</a> (int arg)</td></tr>
<tr class="separator:ga123174ce3a62186d29577e087c34ce91"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga2bbfb1ed4521ad91eacf4b1f71512dcb"><td class="memItemLeft" align="right" valign="top">static const char *const&#160;</td><td class="memItemRight" valign="bottom"><b>kPeripheralNames</b> []</td></tr>
<tr class="separator:ga2bbfb1ed4521ad91eacf4b1f71512dcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Usage Information</h2>
<p>Core bootloader functionality. </p>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="unionstandard__version__t" id="unionstandard__version__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">union standard_version_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Structure of version property. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Public Member Functions</h3></td></tr>
<tr class="memitem:ac5ef9eb6330ce354c82bb9802e57140b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5ef9eb6330ce354c82bb9802e57140b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>StandardVersion</b> ()</td></tr>
<tr class="separator:ac5ef9eb6330ce354c82bb9802e57140b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac96a034f3d8c69b1b78bf1f070725fdc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac96a034f3d8c69b1b78bf1f070725fdc"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>StandardVersion</b> (uint32_t <a class="el" href="group__bl__core.html#acd99bb05ca015e7d74448acb1deba7ca">version</a>)</td></tr>
<tr class="separator:ac96a034f3d8c69b1b78bf1f070725fdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a7e572b79b399092541510ae2f6a646e1"><td class="memItemLeft" ><a class="anchor" id="a7e572b79b399092541510ae2f6a646e1"></a>
struct {</td></tr>
<tr class="memitem:a3999cc3c943699306850c161e3075360"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3999cc3c943699306850c161e3075360"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>bugfix</b></td></tr>
<tr class="memdesc:a3999cc3c943699306850c161e3075360"><td class="mdescLeft">&#160;</td><td class="mdescRight">bugfix version [7:0] <br /></td></tr>
<tr class="separator:a3999cc3c943699306850c161e3075360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2f416b0a34b7beb4ed3873d791ac393"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2f416b0a34b7beb4ed3873d791ac393"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>minor</b></td></tr>
<tr class="memdesc:ae2f416b0a34b7beb4ed3873d791ac393"><td class="mdescLeft">&#160;</td><td class="mdescRight">minor version [15:8] <br /></td></tr>
<tr class="separator:ae2f416b0a34b7beb4ed3873d791ac393"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bd4e4c943762926c8f653b6224cced2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bd4e4c943762926c8f653b6224cced2"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>major</b></td></tr>
<tr class="memdesc:a5bd4e4c943762926c8f653b6224cced2"><td class="mdescLeft">&#160;</td><td class="mdescRight">major version [23:16] <br /></td></tr>
<tr class="separator:a5bd4e4c943762926c8f653b6224cced2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc65b5080badbd1e1482dae3cc685b5b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc65b5080badbd1e1482dae3cc685b5b"></a>
char&#160;</td><td class="memItemRight" valign="bottom"><b>name</b></td></tr>
<tr class="memdesc:afc65b5080badbd1e1482dae3cc685b5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">name [31:24] <br /></td></tr>
<tr class="separator:afc65b5080badbd1e1482dae3cc685b5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e572b79b399092541510ae2f6a646e1"><td class="memItemLeft" valign="top">};&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
<tr class="separator:a7e572b79b399092541510ae2f6a646e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd99bb05ca015e7d74448acb1deba7ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd99bb05ca015e7d74448acb1deba7ca"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bl__core.html#acd99bb05ca015e7d74448acb1deba7ca">version</a></td></tr>
<tr class="memdesc:acd99bb05ca015e7d74448acb1deba7ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">combined version numbers <br /></td></tr>
<tr class="separator:acd99bb05ca015e7d74448acb1deba7ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f5e0643c9533d4170be34c3493cb28f"><td class="memItemLeft" ><a class="anchor" id="a9f5e0643c9533d4170be34c3493cb28f"></a>
struct {</td></tr>
<tr class="memitem:a37054637947a71acd26dc2d2ee0fcb1a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37054637947a71acd26dc2d2ee0fcb1a"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>bugfix</b>: 8</td></tr>
<tr class="memdesc:a37054637947a71acd26dc2d2ee0fcb1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">bugfix version [7:0] <br /></td></tr>
<tr class="separator:a37054637947a71acd26dc2d2ee0fcb1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7feeb248b9f5c0a309c4ec51a3ec57da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7feeb248b9f5c0a309c4ec51a3ec57da"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>minor</b>: 8</td></tr>
<tr class="memdesc:a7feeb248b9f5c0a309c4ec51a3ec57da"><td class="mdescLeft">&#160;</td><td class="mdescRight">minor version [15:8] <br /></td></tr>
<tr class="separator:a7feeb248b9f5c0a309c4ec51a3ec57da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaa8a60018b724301b0de7b13fa449d1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acaa8a60018b724301b0de7b13fa449d1"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>major</b>: 8</td></tr>
<tr class="memdesc:acaa8a60018b724301b0de7b13fa449d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">major version [23:16] <br /></td></tr>
<tr class="separator:acaa8a60018b724301b0de7b13fa449d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aa3cdf7ddf6c2a022af8696384ceba0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6aa3cdf7ddf6c2a022af8696384ceba0"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>name</b>: 8</td></tr>
<tr class="memdesc:a6aa3cdf7ddf6c2a022af8696384ceba0"><td class="mdescLeft">&#160;</td><td class="mdescRight">name [31:24] <br /></td></tr>
<tr class="separator:a6aa3cdf7ddf6c2a022af8696384ceba0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f5e0643c9533d4170be34c3493cb28f"><td class="memItemLeft" valign="top">}&#160;</td><td class="memItemRight" valign="bottom"><b>B</b></td></tr>
<tr class="separator:a9f5e0643c9533d4170be34c3493cb28f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87f3c775ea729760c96689c5d76ecfdb"><td class="memItemLeft" ><a class="anchor" id="a87f3c775ea729760c96689c5d76ecfdb"></a>
struct {</td></tr>
<tr class="memitem:a37054637947a71acd26dc2d2ee0fcb1a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37054637947a71acd26dc2d2ee0fcb1a"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>bugfix</b>: 8</td></tr>
<tr class="memdesc:a37054637947a71acd26dc2d2ee0fcb1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">bugfix version [7:0] <br /></td></tr>
<tr class="separator:a37054637947a71acd26dc2d2ee0fcb1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7feeb248b9f5c0a309c4ec51a3ec57da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7feeb248b9f5c0a309c4ec51a3ec57da"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>minor</b>: 8</td></tr>
<tr class="memdesc:a7feeb248b9f5c0a309c4ec51a3ec57da"><td class="mdescLeft">&#160;</td><td class="mdescRight">minor version [15:8] <br /></td></tr>
<tr class="separator:a7feeb248b9f5c0a309c4ec51a3ec57da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaa8a60018b724301b0de7b13fa449d1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acaa8a60018b724301b0de7b13fa449d1"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>major</b>: 8</td></tr>
<tr class="memdesc:acaa8a60018b724301b0de7b13fa449d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">major version [23:16] <br /></td></tr>
<tr class="separator:acaa8a60018b724301b0de7b13fa449d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aa3cdf7ddf6c2a022af8696384ceba0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6aa3cdf7ddf6c2a022af8696384ceba0"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>name</b>: 8</td></tr>
<tr class="memdesc:a6aa3cdf7ddf6c2a022af8696384ceba0"><td class="mdescLeft">&#160;</td><td class="mdescRight">name [31:24] <br /></td></tr>
<tr class="separator:a6aa3cdf7ddf6c2a022af8696384ceba0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87f3c775ea729760c96689c5d76ecfdb"><td class="memItemLeft" valign="top">}&#160;</td><td class="memItemRight" valign="bottom"><b>B</b></td></tr>
<tr class="separator:a87f3c775ea729760c96689c5d76ecfdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>

</div>
</div>
<a name="structstandard__version__t_8____unnamed____" id="structstandard__version__t_8____unnamed____"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct standard_version_t.__unnamed__</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a35eaed2063b729088b47a7d36ba6567f"></a>uint8_t</td>
<td class="fieldname">
bugfix</td>
<td class="fielddoc">
bugfix version [7:0] </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af1425da40a9f2d21ab702a1c7feae026"></a>uint8_t</td>
<td class="fieldname">
major</td>
<td class="fielddoc">
major version [23:16] </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aab846c0e3717a3e7d14af45cab70b44a"></a>uint8_t</td>
<td class="fieldname">
minor</td>
<td class="fielddoc">
minor version [15:8] </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab068931cc450442b63f5b3d276ea4297"></a>char</td>
<td class="fieldname">
name</td>
<td class="fielddoc">
name [31:24] </td></tr>
</table>

</div>
</div>
<a name="structstandard__version__t_8_b" id="structstandard__version__t_8_b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct standard_version_t.B</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a35eaed2063b729088b47a7d36ba6567f"></a>uint32_t</td>
<td class="fieldname">
bugfix: 8</td>
<td class="fielddoc">
bugfix version [7:0] </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af1425da40a9f2d21ab702a1c7feae026"></a>uint32_t</td>
<td class="fieldname">
major: 8</td>
<td class="fielddoc">
major version [23:16] </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aab846c0e3717a3e7d14af45cab70b44a"></a>uint32_t</td>
<td class="fieldname">
minor: 8</td>
<td class="fielddoc">
minor version [15:8] </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab068931cc450442b63f5b3d276ea4297"></a>uint32_t</td>
<td class="fieldname">
name: 8</td>
<td class="fielddoc">
name [31:24] </td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gae9db7782b7f2dccb1dc6423be46ffc96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__bl__core.html#gae9db7782b7f2dccb1dc6423be46ffc96">_bl_driver_status_groups</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Driver status group numbers. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggae9db7782b7f2dccb1dc6423be46ffc96ac4d0ba42131a1f2221998e4ee22ca61f"></a>kStatusGroup_QuadSPIDriver&#160;</td><td class="fielddoc">
<p>QSPI driver status group number. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae9db7782b7f2dccb1dc6423be46ffc96a64605e39ebfb169850811207616c7823"></a>kStatusGroup_OTFADDriver&#160;</td><td class="fielddoc">
<p>OTFAD driver status group number. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gae7a87f0e341a04a6fee751176175fefd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__bl__core.html#gae7a87f0e341a04a6fee751176175fefd">_bl_status_groups</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bootloader status group numbers. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefda7b33b82772d8f6ee53f685f2fe0e0804"></a>kStatusGroup_Bootloader&#160;</td><td class="fielddoc">
<p>Bootloader status group number (100). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefda52c1421d8ea0a8ac30cf7987f3525f05"></a>kStatusGroup_SBLoader&#160;</td><td class="fielddoc">
<p>SB loader status group number (101). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefda0295e6a28f7dbf89c64224602568aa4d"></a>kStatusGroup_MemoryInterface&#160;</td><td class="fielddoc">
<p>Memory interface status group number (102). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefdaae9ad1ebc64343438b5f3db0e44d6e0b"></a>kStatusGroup_PropertyStore&#160;</td><td class="fielddoc">
<p>Property store status group number (103). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefdaa9b2d10290a393e79fe97ad50241e4c9"></a>kStatusGroup_AppCrcCheck&#160;</td><td class="fielddoc">
<p>Application crc check status group number (104). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefda160b360d06d9c43b36a1d5eb74481f2e"></a>kStatusGroup_Packetizer&#160;</td><td class="fielddoc">
<p>Packetizer status group number (105). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggae7a87f0e341a04a6fee751176175fefdab4480cf74173c3593e256bc4b0d2df12"></a>kStatusGroup_ReliableUpdate&#160;</td><td class="fielddoc">
<p>Reliable Update status groupt number (106). </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga169fadd1031eb3735ac99235f0db28a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__bl__core.html#ga169fadd1031eb3735ac99235f0db28a6">_external_mem_identifiers</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>External memory identifiers. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gade2202a404bcce238c024d3ed5e14249"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void bootloader_flash_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>A static buffer used to hold flash_run_command()</p>
<p>A static buffer used to hold flash_cache_clear_command() </p>

</div>
</div>
<a class="anchor" id="ga6fc04d10b4ac9c20e34f253a7e363674"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void bootloader_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize the bootloader and peripherals. </p>
<p>This function initializes hardware and clocks, loads user configuration data, and initialzes a number of drivers. It then enters the active peripheral detection phase by calling <a class="el" href="group__bl__core.html#ga2f896e38b0d2d72ede8be961e41735ac" title="Determines the active peripheral. ">get_active_peripheral()</a>. Once the peripheral is detected, the packet and comand interfaces are initialized.</p>
<p>Note that this routine may not return if peripheral detection times out and the bootloader jumps directly to the user application in flash. </p>

</div>
</div>
<a class="anchor" id="gada615fb904de1f9e285728377d2054f5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void bootloader_run </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Bootloader outer loop. </p>
<p>Infinitely calls the command interface and active peripheral control interface pump routines. </p>

</div>
</div>
<a class="anchor" id="ga123174ce3a62186d29577e087c34ce91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void exit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Since we never exit this gets rid of the C standard functions that cause extra ROM size usage. </p>

</div>
</div>
<a class="anchor" id="ga2f896e38b0d2d72ede8be961e41735ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static peripheral_descriptor_t const * get_active_peripheral </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines the active peripheral. </p>
<p>This function has several stages:</p><ul>
<li>Init enabled peripherals.</li>
<li>Compute timeout.</li>
<li>Wait for peripheral activity with timeout.</li>
<li>Shutdown inactive peripherals.</li>
</ul>
<p>If peripheral detection times out, then this function will call <a class="el" href="group__bl__core.html#ga8cd77901865430860e0fa71ad749b4cf" title="Exits bootloader and jumps to the user application. ">jump_to_application()</a> to directly enter the user application.</p>
<p>The timeout value comes from the BCA if set, or the #BL_DEFAULT_PERIPHERAL_DETECT_TIMEOUT configuration macro. If the boot pin is asserted, or if there is not a valid user application in flash, then the timeout is disabled and peripheral detection will continue infinitely. </p>

</div>
</div>
<a class="anchor" id="gabfe82b5ceefabda25977d3e08eb1226f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void get_user_application_entry </td>
          <td>(</td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>appEntry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>appStack</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the user application address and stack pointer. </p>
<p>For flash-resident and rom-resident target, gets the user application address and stack pointer from the APP_VECTOR_TABLE. Ram-resident version does not support jumping to application address. </p>

</div>
</div>
<a class="anchor" id="ga271d81e120239010aa16433534a27e21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool is_valid_application_location </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>applicationAddress</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Verify that a given address is ok to jump to. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">applicationAddress</td><td>The entry point address to validate. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Boolean indicating whether the address is valid.</dd></dl>
<p>A given jump address is considered valid if:</p><ul>
<li>Not 0x00000000</li>
<li>Not 0xffffffff</li>
<li>Not the reset handler entry point for the bootloader</li>
<li>Is in flash or is in RAM or QuadSPI (if available) <dl class="section note"><dt>Note</dt><dd>this interface is also used by the configure_quadspi command </dd></dl>
</li>
</ul>

</div>
</div>
<a class="anchor" id="ga89505060c03c972c77c797b5285f0e95"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void shutdown_cleanup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__bl__core.html#gacb231e53631fadb057c5f9a6890858a8">shutdown_type_t</a>&#160;</td>
          <td class="paramname"><em>shutdown</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prepare system for exiting the bootloader. </p>
<p>Performs any cleanup necessary to restore the system to default state prior to exiting the bootloader. This involves restoring the vector table to default, managing the flash cache, and so on.</p>
<p>This routine <em>must</em> be invoked prior to permanently exiting the bootloader.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shutdown</td><td>Specifies different uses for this function 'kShutdownType_Shutdown' means clean up prior to permanently exiting the bootloader. 'kShutdownType_Cleanup' means only clear (flush) the flash cache 'kShutdownType_Reset' means only shutdown all peripherals. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ga2bbfb1ed4521ad91eacf4b1f71512dcb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* const kPeripheralNames[]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line">    <span class="stringliteral">&quot;UART&quot;</span>, </div><div class="line">    <span class="stringliteral">&quot;I2C&quot;</span>,  </div><div class="line">    <span class="stringliteral">&quot;SPI&quot;</span>,  </div><div class="line">    <span class="stringliteral">&quot;CAN&quot;</span>,  </div><div class="line">    <span class="stringliteral">&quot;HID&quot;</span>,  </div><div class="line">    <span class="stringliteral">&quot;CDC&quot;</span>,  </div><div class="line">    <span class="stringliteral">&quot;DFU&quot;</span>,  </div><div class="line">    <span class="stringliteral">&quot;MSD&quot;</span>   </div><div class="line">}</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
